const user = require("./user")
const uuid = require("uuid");
const md5 = require("md5");

user.find({username:"admin"}).then(data=>{
  if(data.length < 1){
    return user.insertMany({
      uId: "admin-" + uuid.v1(),
      username: "admin",
      password: md5("123456"),
      nickName:"李扬",
      power:2,
      tel:"17600901915",
      regTime: Date.now()
    })
  }
}).then(()=>{
  console.log("管理员信息添加成功，账号密码为：admin,123456")
})

